home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue54 / CCorn / TestU.pas < prev   
Encoding:
Pascal/Delphi Source File  |  2000-01-10  |  567 b   |  33 lines

  1. unit TestU;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   Publisher_TLB, StdCtrls;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     Button1: TButton;
  12.     procedure Button1Click(Sender: TObject);
  13.   private
  14.     FEvent: IEventObj;
  15.   end;
  16.  
  17. var
  18.   Form1: TForm1;
  19.  
  20. implementation
  21.  
  22. uses ComObj, ActiveX;
  23.  
  24. {$R *.DFM}
  25.  
  26. procedure TForm1.Button1Click(Sender: TObject);
  27. begin
  28.   OleCheck(CoCreateInstance(CLASS_EventObj, nil, CLSCTX_ALL, IEventObj, FEvent));
  29.   FEvent.MyEvent('This is a clever string');
  30. end;
  31.  
  32. end.
  33.